<template>
    <view>
        <!-- pages/gatheringAuth/auths/index.wxml -->
        <view>
            <view class="steps">
                <van-steps :steps="steps" :active="mainOld == '小微商户' && tab == 2 ? 1 : tab" active-color="#FF8722" />
            </view>
            <van-cell-group class="mt-20" v-if="tab == 0">
                <van-field
                    :readonly="mchtCnShortNameReadonly"
                    :value="mchtCnShortName"
                    data-name="mchtCnShortName"
                    label="商户简称"
                    placeholder="营业执照名称关键字+销售产品命名"
                    :border="false"
                    @change="onChange($event, { name: 'mchtCnShortName' })"
                />
                <view class="hr"></view>
                <view class="text-r pd-20 lh-70">注:商户简称限制4-12字</view>
                <view class="text-6">商户简称在顾客消费付款页中展示</view>
                <van-cell
                    class="custom-class"
                    title="经营类目"
                    center
                    is-link
                    :value="scopesTypeName || '请选择经营类目'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'scopesTypeName', name: 'isShowTypeList' })"
                    data-boolname="scopesTypeName"
                    data-name="isShowTypeList"
                />
                <van-cell
                    class="custom-class"
                    title="店铺地址"
                    center
                    is-link
                    data-boolname="areaJsonName"
                    :value="areaJsonName || '请选择店铺地址'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'areaJsonName', name: 'isShowAreaCodeTree', type: 'dz' })"
                    data-name="isShowAreaCodeTree"
                    data-type="dz"
                />
                <van-field
                    :readonly="addressReadonly"
                    :value="address"
                    label="详细地址"
                    placeholder="详细地址需与营业执照注册地址一致"
                    :border="false"
                    data-name="address"
                    @change="onChange($event, { name: 'address' })"
                />
                <view class="imgbox">
                    <view class="imgitem">
                        <view @tap.stop.prevent="onDownImg" data-name="shopFrontImg">
                            <image class="img_data" :src="shopFrontImgUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">店铺门头照</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'mtz.jpg'" :src="shopimgUrl + 'mtz.jpg'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                    <view class="text-r">
                        门头关键字需与营业执照名称关键字一致;如不一致，需提供法人手持身份证正面照或法人手持营业执照在门头招牌下合影(招牌和手持营业执照/身份证需同时出镜)
                    </view>
                    <view class="imgitem">
                        <view @tap.stop.prevent="onDownImg" data-name="shopInnerImg">
                            <image class="img_data" :src="shopInnerImgUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">店铺全景照</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'qjz.png'" :src="shopimgUrl + 'qjz.png'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                    <view class="imgitem mt-40">
                        <view @tap.stop.prevent="onDownImg" data-name="checkstandImg">
                            <image class="img_data" :src="checkstandImgUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">收银台照</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'sytz.png'" :src="shopimgUrl + 'sytz.png'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                    <view class="text-r">收银台照片需要包含收款机具/微信/支付宝/银联云闪付标识，取镜扩展至周边场景体现出经营范围</view>
                </view>
                <view class="first_btn" @tap.stop.prevent="onNext">下一步</view>
                <view class="h-10"></view>
            </van-cell-group>
            <van-cell-group class="mt-20" v-if="tab == 1">
                <view class="imgbox">
                    <view class="imgitem">
                        <view @tap.stop.prevent="onDownImg" data-name="license">
                            <image class="img_data" :src="licenseUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">三证合一营业执照</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'yyzz.jpg'" :src="shopimgUrl + 'yyzz.jpg'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                </view>
                <van-field
                    :readonly="licNoReadonly"
                    :value="licNo"
                    label="注册号"
                    placeholder="请输入注册号"
                    :border="false"
                    @change="onChange($event, { name: 'licNo' })"
                    data-name="licNo"
                />
                <van-field
                    :readonly="mchtNameReadonly"
                    :value="mchtName"
                    label="公司名称"
                    placeholder="请输入公司名称"
                    :border="false"
                    @change="onChange($event, { name: 'mchtName' })"
                    data-name="mchtName"
                />
                <view class="text-6">若营业执照名称为空白或者*，对应公司名称需填写“个体户+法人姓名”，例如“个体户张三”</view>
                <van-field
                    :readonly="registeredAddressReadonly"
                    :value="registeredAddress"
                    label="注册地址"
                    placeholder="请输入注册地址"
                    :border="false"
                    @change="onChange($event, { name: 'registeredAddress' })"
                    data-name="registeredAddress"
                />
                <view class="flexbox-sb combox">
                    <text class="text">营业执照永久有效</text>
                    <van-switch size="20px" :checked="businessStatus" @change="onChangeStatus($event, { name: 'businessStatus' })" data-name="businessStatus" />
                </view>
                <view>
                    <van-cell
                        class="custom-class"
                        title="开始日期"
                        center
                        is-link
                        :value="businessTermstart || '请选择有效期的开始日期'"
                        @tap.native.stop.prevent="onshowModal($event, { boolname: 'isShowTime', name: 'isShowTime', timeName: 'businessTermstart' })"
                        data-boolname="isShowTime"
                        data-name="isShowTime"
                        data-timeName="businessTermstart"
                    />
                    <van-cell
                        v-if="!businessStatus"
                        class="custom-class"
                        title="结束日期"
                        center
                        is-link
                        :value="businessTermend || '请选择有效期的结束日期'"
                        @tap.native.stop.prevent="onshowModal($event, { name: 'isShowTime', boolname: 'businessTermend', timename: 'businessTermend' })"
                        data-name="isShowTime"
                        data-boolname="businessTermend"
                        data-timename="businessTermend"
                    />
                </view>
                <!-- 只有对公不需要三证合一 -->
                <view v-if="account != '对公'">
                    <van-cell
                        @tap.native.stop.prevent="showPicker_OneStatus($event, { name: 'threeCertificatesInOneStatus' })"
                        data-name="threeCertificatesInOneStatus"
                        title="营业执照是否为三证合一"
                        center
                        is-link
                        :value="threeCertificatesInOneStatus"
                    />
                    <view class="imgbox" v-if="threeCertificatesInOneStatus == '否'">
                        <view class="imgitem">
                            <view @tap.stop.prevent="onDownImg" data-name="taxImage">
                                <image class="img_data" :src="taxImageUrl || shopimgUrl + 'noimgsee.png'" />
                                <view class="img_name">组织机构代码</view>
                            </view>
                            <view>
                                <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'zzjg.jpg'" :src="shopimgUrl + 'zzjg.jpg'" />
                                <view class="img_name">样例</view>
                            </view>
                        </view>
                        <view class="imgitem mt-20">
                            <view @tap.stop.prevent="onDownImg" data-name="orgImage">
                                <image class="img_data" :src="orgImageUrl || shopimgUrl + 'noimgsee.png'" />
                                <view class="img_name">税务登记证</view>
                            </view>
                            <view>
                                <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'swdj.jpg'" :src="shopimgUrl + 'swdj.jpg'" />
                                <view class="img_name">样例</view>
                            </view>
                        </view>
                    </view>
                    <!-- 只有法人的时候需要组织机构代码 -->
                    <!-- <van-field  readonly="{{mchtNameReadonly}}" wx:if="{{account == '法人'}}" value="{{ }}" label="组织机构代码" placeholder="请输入组织机构代码" border="{{ false }}" bind:change="onChange" /> -->
                    <view class="text-6">三证合一:营业执照号为“社会统一信用代码”</view>
                    <view class="text-6">非三证合一:营业执照号为“注册号”</view>
                    <view class="text-6">注:营业执照为注册号且是企业类型还需在其他信息栏上传组织机构代码证和税务登记证</view>
                </view>
                <view class="combtnbox flexbox-sb">
                    <view class="com_s" @tap.stop.prevent="onBack">上一步</view>
                    <view class="com_x" @tap.stop.prevent="onNext">下一步</view>
                </view>
            </van-cell-group>
            <van-cell-group class="mt-20" v-if="tab == 2">
                <view class="imgbox">
                    <view class="imgitem">
                        <view @tap.stop.prevent="onDownImg" data-name="idCardFront">
                            <image class="img_data" :src="idCardFrontUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">法人身份证人像面</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'sfzrx.jpg'" :src="shopimgUrl + 'sfzrx.jpg'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                    <view class="imgitem mt-20">
                        <view @tap.stop.prevent="onDownImg" data-name="idCardBack">
                            <image class="img_data" :src="idCardBackUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">法人身份证国徽面</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'sfzgh.jpg'" :src="shopimgUrl + 'sfzgh.jpg'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                    <view class="imgitem mt-20" v-if="main != '企业'">
                        <view @tap.stop.prevent="onDownImg" data-name="personWithIdCard">
                            <image class="img_data" :src="personWithIdCardUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">法人手持身份证</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'scsfz.jpg'" :src="shopimgUrl + 'scsfz.jpg'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                </view>
                <van-field
                    :readonly="userNameReadonly"
                    :value="userName"
                    label="法人姓名"
                    placeholder="请输入姓名"
                    :border="false"
                    @change="onChange($event, { name: 'userName' })"
                    data-name="userName"
                />
                <van-field
                    :readonly="userCardNoReadonly"
                    :value="userCardNo"
                    label="法人身份证号"
                    placeholder="请输入身份证号"
                    :border="false"
                    @change="onChange($event, { name: 'userCardNo' })"
                    data-name="userCardNo"
                    maxlength="18"
                />
                <view class="flexbox-sb combox">
                    <text class="text">身份证永久有效</text>
                    <van-switch
                        size="20px"
                        :checked="isperiodValidityStatus"
                        @change="onChangeStatus($event, { name: 'isperiodValidityStatus' })"
                        data-name="isperiodValidityStatus"
                    />
                </view>
                <view>
                    <van-cell
                        class="custom-class"
                        title="起始有效期"
                        center
                        is-link
                        :value="periodValiditystart || '请选择起始有效期'"
                        @tap.native.stop.prevent="onshowModal($event, { boolname: 'periodValiditystart', timename: 'periodValiditystart', name: 'isShowTime' })"
                        data-boolname="periodValiditystart"
                        data-timename="periodValiditystart"
                        data-name="isShowTime"
                    />
                    <van-cell
                        v-if="!isperiodValidityStatus"
                        class="custom-class"
                        title="结束有效期"
                        center
                        is-link
                        :value="periodValidityend || '请选择结束有效期'"
                        @tap.native.stop.prevent="onshowModal($event, { boolname: 'periodValidityend', timename: 'periodValidityend', name: 'isShowTime' })"
                        data-boolname="periodValidityend"
                        data-timename="periodValidityend"
                        data-name="isShowTime"
                    />
                </view>
                <van-field
                    :readonly="userPhoneReadonly"
                    :value="userPhone"
                    label="法人手机"
                    placeholder="请输入法人手机号"
                    :border="false"
                    @change="onChange($event, { name: 'userPhone' })"
                    data-name="userPhone"
                    maxlength="11"
                />
                <view class="combtnbox flexbox-sb mt-60">
                    <view class="com_s" @tap.stop.prevent="onBack">上一步</view>
                    <view class="com_x" @tap.stop.prevent="onNext">下一步</view>
                </view>
            </van-cell-group>
            <van-cell-group class="mt-20" v-if="(tab == 3 && main == '个体' && account != '对公') || (tab == 3 && mainOld == '小微商户')">
                <view class="imgbox">
                    <view class="imgitem">
                        <view @tap.stop.prevent="onDownImg" data-name="bankCard">
                            <image class="img_data" :src="bankCardUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">银行卡正面照</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'yhkz.jpg'" :src="shopimgUrl + 'yhkz.jpg'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                </view>
                <view class="text-r pd-20">注:资料图片不允许翻拍、截图、网络照片</view>
                <van-field
                    :readonly="accountNoReadonly"
                    v-if="account == '法人'"
                    :value="accountNo"
                    label="法人银行账号"
                    :placeholder="mainOld == '小微商户' ? '请输入银行账号(勿使用二类卡)' : '请输入法人银行账号'"
                    :border="false"
                    @change="onChange($event, { name: 'accountNo' })"
                    data-name="accountNo"
                />
                <van-field
                    :readonly="accountNameReadonly"
                    v-if="account == '法人'"
                    :value="accountName"
                    label="法人开户名"
                    placeholder="请输入法人开户名"
                    :border="false"
                    @change="onChange($event, { name: 'accountName' })"
                    data-name="accountName"
                />
                <van-field
                    :readonly="accountNoReadonly"
                    v-if="account == '非法人'"
                    :value="accountNo"
                    label="银行账号"
                    placeholder="请输入银行账号(勿使用二类卡)"
                    :border="false"
                    @change="onChange($event, { name: 'accountNo' })"
                    data-name="accountNo"
                />
                <van-field
                    :readonly="accountNameReadonly"
                    v-if="account == '非法人'"
                    :value="accountName"
                    label="开户名"
                    placeholder="请输入法人开户名"
                    :border="false"
                    @change="onChange($event, { name: 'accountName' })"
                    data-name="accountName"
                />
                <view class="text-r pd-20">结算卡仅支持借记卡，请勿上传贷记卡，贷记卡会无法进行结算!</view>
                <view class="text-r pd-20">银行账号开户名需与上传的身份证名称一致。否则将会审核不通过或造成资金安全风险!</view>
                <van-field
                    :readonly="resserveMobileReadonly"
                    :value="resserveMobile"
                    label="预留手机号"
                    placeholder="请输入预留手机号"
                    :border="false"
                    @change="onChange($event, { name: 'resserveMobile' })"
                    data-name="resserveMobile"
                    maxlength="11"
                />
                <van-cell
                    class="custom-class"
                    title="开户银行"
                    center
                    is-link
                    :value="zbankRegionCodeZName || '请选择开户银行'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'zbankRegionCodeZName', name: 'isShowBank', bank: 'zbankRegionCodeZ' })"
                    data-boolname="zbankRegionCodeZName"
                    data-name="isShowBank"
                    data-bank="zbankRegionCodeZ"
                />
                <van-cell
                    class="custom-class"
                    title="开户地址"
                    center
                    is-link
                    data-boolname="zbankRegionCodeSiteName"
                    :value="zbankRegionCodeSiteName || '请选择开户地址'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'zbankRegionCodeSiteName', name: 'isShowAreaCodeTree', type: 'kh' })"
                    data-name="isShowAreaCodeTree"
                    data-type="kh"
                />
                <van-cell
                    class="custom-class"
                    title="开户支行"
                    center
                    is-link
                    data-boolname="zbankNoName"
                    :value="zbankNoName || '请选择开户支行'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'zbankNoName', name: 'isShowBank', bank: 'zbankRegionCode' })"
                    data-name="isShowBank"
                    data-bank="zbankRegionCode"
                />
                <view class="combtnbox flexbox-sb mt-246" v-if="tab + 1 != steps.length && mainOld != '小微商户'">
                    <view class="com_s" @tap.stop.prevent="onBack">上一步</view>
                    <view class="com_x" @tap.stop.prevent="onNext">下一步</view>
                </view>
            </van-cell-group>
            <van-cell-group class="mt-20" v-if="tab == 3 && (main == '企业' || (main == '个体' && account == '对公'))">
                <view class="imgbox">
                    <view class="imgitem">
                        <view @tap.stop.prevent="onDownImg" data-name="openAccountLicenses">
                            <image class="img_data" :src="openAccountLicensesUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">开户许可证</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'dgxkz.jpg'" :src="shopimgUrl + 'dgxkz.jpg'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                </view>
                <van-field
                    :readonly="openBankAccNameReadonly"
                    :value="openBankAccName"
                    label="开户名"
                    placeholder="请输入开户名"
                    :border="false"
                    @change="onChange($event, { name: 'openBankAccName' })"
                    data-name="openBankAccName"
                />
                <van-field
                    :readonly="openBankAccoutReadonly"
                    :value="openBankAccout"
                    label="银行卡号"
                    placeholder="请输入银行卡号"
                    :border="false"
                    @change="onChange($event, { name: 'openBankAccout' })"
                    data-name="openBankAccout"
                />
                <van-cell
                    class="custom-class"
                    title="开户银行"
                    center
                    is-link
                    :value="openCollectBankCodeName || '请选择开户银行'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'openCollectBankCodeName', name: 'isShowBank', bank: 'tbStoreBoxBank' })"
                    data-boolname="openCollectBankCodeName"
                    data-name="isShowBank"
                    data-bank="tbStoreBoxBank"
                />
                <van-cell
                    class="custom-class"
                    title="开户地址"
                    center
                    is-link
                    data-boolname="openUnionNoSiteName"
                    :value="openUnionNoSiteName || '请选择开户地址'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'openUnionNoSiteName', name: 'isShowAreaCodeTree', type: 'kh_dg' })"
                    data-name="isShowAreaCodeTree"
                    data-type="kh_dg"
                />
                <van-cell
                    class="custom-class"
                    title="开户支行"
                    center
                    is-link
                    :value="openUnionNoName || '请选择开户支行'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'openUnionNoName', name: 'isShowBank', bank: 'storeBoxBankZList' })"
                    data-boolname="openUnionNoName"
                    data-name="isShowBank"
                    data-bank="storeBoxBankZList"
                />
                <view class="text-6">若商户无开户许可证，可提供印鉴卡、对公账户流水单或加盖公司公章的账户证明。</view>
                <view class="imgbox">
                    <view class="imgitem">
                        <view>
                            <image class="img_data" :data-item="shopimgUrl + 'yjk.jpg'" :src="shopimgUrl + 'yjk.jpg'" @tap.stop.prevent="previewImg" />
                            <view class="img_name">样例-印鉴卡</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'dgzm.jpg'" :src="shopimgUrl + 'dgzm.jpg'" />
                            <view class="img_name">样例-对公账户证明</view>
                        </view>
                    </view>
                    <view class="imgitem mt-20">
                        <view>
                            <image class="img_data" :data-item="shopimgUrl + 'dgls.png'" :src="shopimgUrl + 'dgls.png'" @tap.stop.prevent="previewImg" />
                            <view class="img_name">样例-对公账户流水单</view>
                        </view>
                        <view></view>
                    </view>
                </view>
                <view class="combtnbox flexbox-sb" v-if="tab + 1 != steps.length">
                    <view class="com_s" @tap.stop.prevent="onBack">上一步</view>
                    <view class="com_x" @tap.stop.prevent="onNext">下一步</view>
                </view>
            </van-cell-group>
            <van-cell-group class="mt-20" v-if="tab == 4 && account != '法人'">
                <view class="imgbox">
                    <view class="imgitem">
                        <view @tap.stop.prevent="onDownImg" data-name="agentIdCardFront">
                            <image class="img_data" :src="agentIdCardFrontUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">被委托人身份证人像面</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'sfzrx.jpg'" :src="shopimgUrl + 'sfzrx.jpg'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                    <view class="imgitem mt-20">
                        <view @tap.stop.prevent="onDownImg" data-name="agentIdCardBack">
                            <image class="img_data" :src="agentIdCardBackUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">被委托人身份证国徽面</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'sfzgh.jpg'" :src="shopimgUrl + 'sfzgh.jpg'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                    <view class="imgitem mt-20">
                        <view @tap.stop.prevent="onDownImg" data-name="agentProtocol">
                            <image class="img_data" :src="agentProtocolUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">委托结算授权书</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'wtxy.png'" :src="shopimgUrl + 'wtxy.png'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                    <view class="text-xz" @tap.stop.prevent="onDown">《委托结算授权书》下载</view>
                    <view class="imgitem mt-20">
                        <view @tap.stop.prevent="onDownImg" data-name="holdAgentProtocol">
                            <image class="img_data" :src="holdAgentProtocolUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">法人手持委托清算协议照片</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'scwtxy.jpg'" :src="shopimgUrl + 'scwtxy.jpg'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                </view>
                <van-field
                    :readonly="accountNameReadonly"
                    :value="accountName"
                    label="姓名"
                    placeholder="请输入姓名"
                    :border="false"
                    @change="onChange($event, { name: 'accountName' })"
                    data-name="accountName"
                />
                <van-field
                    :readonly="agentCardNoReadonly"
                    :value="agentCardNo"
                    label="身份证号"
                    placeholder="请输入身份证号"
                    :border="false"
                    @change="onChange($event, { name: 'agentCardNo' })"
                    data-name="agentCardNo"
                    maxlength="18"
                />
                <view class="flexbox-sb combox">
                    <text class="text">身份证永久有效</text>
                    <van-switch
                        size="20px"
                        :checked="isagentPeriodValidity"
                        @change="onChangeStatus($event, { name: 'isagentPeriodValidity' })"
                        data-name="isagentPeriodValidity"
                    />
                </view>
                <view>
                    <van-cell
                        class="custom-class"
                        title="起始有效期"
                        center
                        is-link
                        :value="agentPeriodValidityStart || '请选择起始有效期'"
                        @tap.native.stop.prevent="onshowModal($event, { boolname: 'agentPeriodValidityStart', name: 'isShowTime', timeName: 'agentPeriodValidityStart' })"
                        data-boolname="agentPeriodValidityStart"
                        data-name="isShowTime"
                        data-timeName="agentPeriodValidityStart"
                    />
                    <van-cell
                        v-if="!isagentPeriodValidity"
                        class="custom-class"
                        title="结束有效期"
                        center
                        is-link
                        data-boolname="agentPeriodValidityEnd"
                        :value="agentPeriodValidityEnd || '请选择结束有效期'"
                        @tap.native.stop.prevent="onshowModal($event, { boolname: 'agentPeriodValidityEnd', name: 'isShowTime', timeName: 'agentPeriodValidityEnd' })"
                        data-name="isShowTime"
                        data-timeName="agentPeriodValidityEnd"
                    />
                </view>
                <view class="combtnbox flexbox-sb" v-if="tab + 1 != steps.length">
                    <view class="com_s" @tap.stop.prevent="onBack">上一步</view>
                    <view class="com_x" @tap.stop.prevent="onNext">下一步</view>
                </view>
            </van-cell-group>
            <van-cell-group class="mt-20" v-if="tab == 4 && account == '法人'">
                <view class="imgbox">
                    <view class="imgitem">
                        <view @tap.stop.prevent="onDownImg" data-name="bankCard">
                            <image class="img_data" :src="bankCardUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">银行卡正面照</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'yhkz.jpg'" :src="shopimgUrl + 'yhkz.jpg'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                    <view class="text-r">注:资料图片不允许翻拍、截图、网络照片</view>
                    <view class="imgitem">
                        <view @tap.stop.prevent="onDownImg" data-name="priLicAgreement">
                            <image class="img_data" :src="priLicAgreementUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">对私结算授权书</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'dswtxy.png'" :src="shopimgUrl + 'dswtxy.png'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                    <view @tap.stop.prevent="onDown">
                        <text class="text-r">注:</text>
                        <text class="text-xz">企业法人对私结算授权书下载与示例>></text>
                    </view>
                </view>
                <van-field
                    :readonly="accountNoReadonly"
                    :value="accountNo"
                    label="法人银行账号"
                    placeholder="请输入法人银行账号"
                    :border="false"
                    @change="onChange($event, { name: 'accountNo' })"
                    data-name="accountNo"
                />
                <van-field
                    :readonly="accountNameReadonly"
                    :value="accountName"
                    label="法人开户名"
                    placeholder="请输入法人开户名"
                    :border="false"
                    @change="onChange($event, { name: 'accountName' })"
                    data-name="accountName"
                />
                <view class="text-r pd-20">结算卡仅支持借记卡，请勿上传贷记卡，贷记卡会无法进行结算!</view>
                <view class="text-r pd-20">银行账号开户名需与上传的身份证名称一致。否则将会审核不通过或造成资金安全风险!</view>
                <van-field
                    :readonly="resserveMobileReadonly"
                    :value="resserveMobile"
                    label="预留手机号"
                    placeholder="请输入预留手机号"
                    :border="false"
                    @change="onChange($event, { name: 'resserveMobile' })"
                    data-name="resserveMobile"
                    maxlength="11"
                />
                <van-cell
                    class="custom-class"
                    title="开户银行"
                    center
                    is-link
                    :value="zbankRegionCodeZName || '请选择开户银行'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'zbankRegionCodeZName', name: 'isShowBank', bank: 'zbankRegionCodeZ' })"
                    data-boolname="zbankRegionCodeZName"
                    data-name="isShowBank"
                    data-bank="zbankRegionCodeZ"
                />
                <van-cell
                    class="custom-class"
                    title="开户地址"
                    center
                    is-link
                    data-boolname="zbankRegionCodeSiteName"
                    :value="zbankRegionCodeSiteName || '请选择开户地址'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'zbankRegionCodeSiteName', name: 'isShowAreaCodeTree', type: 'kh' })"
                    data-name="isShowAreaCodeTree"
                    data-type="kh"
                />
                <van-cell
                    class="custom-class"
                    title="开户支行"
                    center
                    is-link
                    data-boolname="zbankNoName"
                    :value="zbankNoName || '请选择开户支行'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'zbankNoName', name: 'isShowBank', bank: 'zbankRegionCode' })"
                    data-name="isShowBank"
                    data-bank="zbankRegionCode"
                />
            </van-cell-group>
            <van-cell-group class="mt-20" v-if="tab == 5">
                <view class="imgbox">
                    <view class="imgitem">
                        <view @tap.stop.prevent="onDownImg" data-name="bankCard">
                            <image class="img_data" :src="bankCardUrl || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">银行卡正面照</view>
                        </view>
                        <view>
                            <image class="img_data" @tap.stop.prevent="previewImg" :data-item="shopimgUrl + 'yhkz.jpg'" :src="shopimgUrl + 'yhkz.jpg'" />
                            <view class="img_name">样例</view>
                        </view>
                    </view>
                </view>
                <view class="text-r pd-20">注:资料图片不允许翻拍、截图、网络照片</view>
                <van-field
                    :readonly="accountNoReadonly"
                    :value="accountNo"
                    label="银行账号"
                    placeholder="请输入银行账号(勿使用二类卡)"
                    :border="false"
                    @change="onChange($event, { name: 'accountNo' })"
                    data-name="accountNo"
                />
                <van-field
                    :readonly="accountNameReadonly"
                    :value="accountName"
                    label="开户名"
                    placeholder="请输入法人开户名"
                    :border="false"
                    @change="onChange($event, { name: 'accountName' })"
                    data-name="accountName"
                />
                <view class="text-r pd-20">结算卡仅支持借记卡，请勿上传贷记卡，贷记卡会无法进行结算!</view>
                <view class="text-r pd-20">银行账号开户名需与上传的身份证名称一致。否则将会审核不通过或造成资金安全风险!</view>
                <van-field
                    :readonly="resserveMobileReadonly"
                    :value="resserveMobile"
                    label="预留手机号"
                    placeholder="请输入预留手机号"
                    :border="false"
                    @change="onChange($event, { name: 'resserveMobile' })"
                    data-name="resserveMobile"
                    maxlength="11"
                />
                <van-cell
                    class="custom-class"
                    title="开户银行"
                    center
                    is-link
                    :value="zbankRegionCodeZName || '请选择开户银行'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'zbankRegionCodeZName', name: 'isShowBank', bank: 'zbankRegionCodeZ' })"
                    data-boolname="zbankRegionCodeZName"
                    data-name="isShowBank"
                    data-bank="zbankRegionCodeZ"
                />
                <van-cell
                    class="custom-class"
                    title="开户地址"
                    center
                    is-link
                    :value="zbankRegionCodeSiteName || '请选择开户地址'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'zbankRegionCodeSiteName', name: 'isShowAreaCodeTree', type: 'kh' })"
                    data-boolname="zbankRegionCodeSiteName"
                    data-name="isShowAreaCodeTree"
                    data-type="kh"
                />
                <van-cell
                    class="custom-class"
                    title="开户支行"
                    center
                    is-link
                    :value="zbankNoName || '请选择开户支行'"
                    @tap.native.stop.prevent="onshowModal($event, { boolname: 'zbankNoName', name: 'isShowBank', bank: 'zbankRegionCode' })"
                    data-boolname="zbankNoName"
                    data-name="isShowBank"
                    data-bank="zbankRegionCode"
                />
                <view class="combtnbox flexbox-sb" v-if="tab + 1 != steps.length">
                    <view class="com_s" @tap.stop.prevent="onBack">上一步</view>
                    <view class="com_x" @tap.stop.prevent="onNext">下一步</view>
                </view>
            </van-cell-group>
            <!-- 只有到最后一步的时候才会出现,从第四开始要考虑是否是最后一步去展示按钮 -->
            <view v-if="(mainOld == '小微商户' ? tab : tab + 1) == steps.length">
                <view class="imgbox">
                    <view class="flexbox-sb" @tap.stop.prevent="toMoreadept">
                        <view>
                            <text class="text">补充资料</text>
                            <text class="text-6">（非必填项）</text>
                        </view>
                        <view class="centers">
                            <image v-if="showabccl" class="icon-40" :src="imgUrl + 'bottom.png'"></image>
                            <image v-if="!showabccl" class="icon-40" :src="imgUrl + 'top.png'"></image>
                        </view>
                    </view>
                    <view class="imgitem mt-20" v-if="showabccl">
                        <view @tap.stop.prevent="onDownImg" data-name="extra1">
                            <image class="img_data" :src="extra1Url || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">补充资料1</view>
                        </view>
                        <view @tap.stop.prevent="onDownImg" data-name="extra2">
                            <image class="img_data" :src="extra2Url || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">补充资料2</view>
                        </view>
                    </view>
                    <view class="imgitem mt-20" v-if="showabccl">
                        <view @tap.stop.prevent="onDownImg" data-name="extra3">
                            <image class="img_data" :src="extra3Url || shopimgUrl + 'noimgsee.png'" />
                            <view class="img_name">补充资料3</view>
                        </view>
                        <view></view>
                    </view>
                </view>
                <!-- <view class="first_btn" catchtap="onNext" data-name="完成">完成</view> -->
            </view>
            <view class="combtnbox flexbox-sb mt-30" v-if="(mainOld == '小微商户' ? tab : tab + 1) == steps.length">
                <view class="com_s" @tap.stop.prevent="onBack">上一步</view>
                <view class="com_x" @tap.stop.prevent="onNext" data-name="完成">完成</view>
            </view>
        </view>
        <van-dialog
            id="van-dialog"
            :show="show"
            title="注意"
            message="为保证商户正常收款功能，请严格按照规范提供有效证件，若审查结果不符合要求，将可能存在设置限额、延迟结算、关闭支付权限等风险!"
            confirmButtonText="知道了"
        />

        <picker
            :isShowPicker="isShowOneStatus"
            @sure="sureCallBack_OneStatus"
            @cancle="cancleCallBack_OneStatus"
            scrollType="normal"
            :listData="listData_OneStatus"
            indicatorStyle="height:47px"
        ></picker>

        <van-overlay z-index="99999" :show="isShowTypeList" @click="onClickHide($event, { name: 'isShowTypeList' })" data-name="isShowTypeList">
            <view class="box" @tap.stop.prevent="shop">
                <picker-view indicator-style="height: 50px;" class="pickerview" :value="value" @change="bindChangeTypeList">
                    <picker-view-column>
                        <view :data-item="item.children" style="line-height: 50px; text-align: center" v-for="(item, index) in scopesList" :key="index">
                            {{ item.categoryName }}
                        </view>
                    </picker-view-column>
                    <picker-view-column>
                        <view style="line-height: 50px; text-align: center" v-for="(item, index) in scopesSubclassList" :key="index">{{ item.categoryName }}</view>
                    </picker-view-column>
                </picker-view>
                <view class="picker-footer" @tap.stop.prevent="sure">
                    <text>确认</text>
                </view>
            </view>
        </van-overlay>

        <van-overlay z-index="99999" :show="isShowAreaCodeTree" @click="onClickHide($event, { name: 'isShowAreaCodeTree' })" data-name="isShowAreaCodeTree">
            <view class="box" @tap.stop.prevent="shop">
                <picker-view indicator-style="height: 50px;" class="pickerview" :value="value" @change="bindChangeAreaCodeTree">
                    <picker-view-column>
                        <view style="line-height: 50px; text-align: center" v-for="(item, index) in siteList" :key="index">{{ item.name }}</view>
                    </picker-view-column>
                    <picker-view-column>
                        <view style="line-height: 50px; text-align: center" v-for="(item, index) in siteListCity" :key="index">{{ item.name }}</view>
                    </picker-view-column>
                    <picker-view-column>
                        <view style="line-height: 50px; text-align: center" v-for="(item, index) in siteListDrovince" :key="index">{{ item.name }}</view>
                    </picker-view-column>
                </picker-view>
                <view class="picker-footer" @tap.stop.prevent="sureAreaCodeTree">
                    <text>确认</text>
                </view>
            </view>
        </van-overlay>

        <van-overlay z-index="99999" :show="isShowTime" @click="onClickHide($event, { name: 'isShowTime' })" data-name="isShowTime">
            <view class="box" @tap.stop.prevent="shop">
                <van-datetime-picker
                    type="date"
                    @confirm="onConfirm($event, { name: 'isShowTime' })"
                    :min-date="minDate"
                    :max-date="maxDate"
                    :formatter="formatter"
                    @cancel="onClickHide($event, { name: 'isShowTime' })"
                    data-name="isShowTime"
                />
            </view>
        </van-overlay>

        <van-overlay z-index="99999" :show="isShowBank" @click="onClickHide($event, { name: 'isShowBank' })" data-name="isShowBank">
            <view class="box" @tap.stop.prevent="shop">
                <van-search :value="searchValue" placeholder="请输入搜索关键词" @change="onSearch" />
                <picker-view indicator-style="height: 50px;" class="pickerview" :value="value" @change="bindChangeBank">
                    <picker-view-column>
                        <view style="line-height: 50px; text-align: center" v-for="(item, index) in searchList" :key="index">{{ item.name || item.branchName }}</view>
                    </picker-view-column>
                </picker-view>
                <view class="picker-footer" @tap.stop.prevent="sureBank">
                    <text>确认</text>
                </view>
            </view>
        </van-overlay>
    </view>
</template>

<script>
import picker from '@/component/picker/picker';
// pages/gatheringAuth/auths/index.js
const app = getApp(); // 引入app

const _request = require('../../../utils/request.js'); // 引入require;

const moment = require('../../../utils/moment.min');

export default {
    components: {
        picker
    },
    data() {
        return {
            shopimgUrl: app.globalData.shopimgUrl,
            baseurl: app.globalData.baseurl,

            //全局baseurl路径
            imgUrl: app.globalData.imgUrl,

            //全局img路径
            tab: 0,

            // 第几步
            steps: [],

            mainOld: '',

            // 特殊处理小微企业加的参数
            incomingInfo: null,

            // 进件对象
            maxDate: new Date(2050, 11, 31).getTime(),

            account: '',

            // 结算方式
            main: '',

            // 主体
            mchtCnShortName: '',

            // 商户 简称
            scopesList: [],

            // 经营范围
            scopesSubclassList: [],

            // 经营范围-子类
            subclassType: '',

            // 经营范围类型
            scopesType: '',

            // 经营范围-子类类型
            businessId: '',

            // 经营范围businessId
            siteList: [],

            // 地址
            siteListCity: [],

            // 地址
            siteListDrovince: [],

            // 地址
            address: '',

            // 详情地址
            areaNo: '',

            // 区编码
            licNo: '',

            // 营业执照注册号
            mchtName: '',

            // 公司名称
            shopFrontImg: '',

            // 店铺照片门头
            shopInnerImg: '',

            // 店铺照片全景
            checkstandImg: '',

            // 店铺照片收银台
            shopFrontImgUrl: '',

            // 店铺照片门头
            shopInnerImgUrl: '',

            // 店铺照片全景
            checkstandImgUrl: '',

            // 店铺照片收银台
            registeredAddress: '',

            // 注册地址
            businessStatus: true,

            // 营业执照有效期
            businessTermstart: '',

            // 注册时间
            businessTermend: '',

            // 注册时间
            threeCertificatesInOneStatus: '是',

            // 营业执照是否为三证合一
            license: '',

            //营业证书照片
            licenseUrl: '',

            //营业证书照片
            taxImage: '',

            //组织机构代码照片
            taxImageUrl: '',

            //组织机构代码照片
            orgImage: '',

            //税务登记证
            orgImageUrl: '',

            //税务登记证
            userName: '',

            //法人姓名
            userPhone: '',

            //法人手机号
            userCardNo: '',

            //法人身份证号
            periodValidityStatus: '是',

            //身份证有效期
            periodValiditystart: '',

            // 注册时间
            periodValidityend: '',

            // 注册时间
            personWithIdCard: '',

            // 手持身份证半照
            idCardFront: '',

            // 上传身份证正面
            idCardBack: '',

            // 上传身份证反面
            personWithIdCardUrl: '',

            // 手持身份证半照
            idCardFrontUrl: '',

            // 上传身份证正面
            idCardBackUrl: '',

            // 上传身份证反面
            accountType: '0',

            // 账户类型 默认对公
            accountName: '',

            // 开户名
            accountNo: '',

            // 银行卡卡号
            openBankRegionCode: '',

            // 开户总银行地区
            openBankRegionCodeName: '',

            // 开户总银行地区
            openCollectBankCode: '',

            // 开户总银行
            zbankNo: '',

            //  开户支银行
            zbankRegionCodeZ: '',

            //开户总银行地区
            zbankRegionCode: '',

            //开户支银行地区
            openAccountLicenses: '',

            // 开户许可证
            openAccountLicensesUrl: '',

            // 开户许可证
            bankCardUrl: '',

            //银行卡url
            bankCard: '',

            //银行卡url
            agentProtocolUrl: '',

            //委托结算协议
            agentProtocol: '',

            //委托结算协议
            resserveMobile: '',

            //预留手机号
            licenceType: '1',

            // 营业执类型
            accountProxy: '0',

            // 是否是委托清算
            agentIdCardBackUrl: '',

            //被委托人身份证人像面照
            agentIdCardBack: '',

            //被委托人身份证人像面照
            agentIdCardFrontUrl: '',

            //被委托人身份证国徽面照
            agentIdCardFront: '',

            //被委托人身份证国徽面照
            holdAgentProtocolUrl: '',

            //法人手持委托协议
            holdAgentProtocol: '',

            //法人手持委托协议
            agentCardNo: '',

            //被委托人身份证
            openBankAccName: '',

            // 开户许可证-开户名
            openBankAccout: '',

            // 开户许可证-银行卡号
            openUnionNoName: '',

            // 开户支行 对公回显
            openUnionNoSiteName: '',

            // 开户地址 对公回显
            openUnionNoSiteId: '',

            // 开户地址id
            openUnionNoZName: '',

            // 开户总行
            openUnionNo: '',

            // 开户支行 对公
            scopesTypeName: '',

            // 经营范围回显
            subclassTypeName: '',

            // 经营范围回显
            areaJsonName: '',

            // 省市区回显
            openUnionNoSiteName: '',

            // 开户许可证省市区回显
            zbankNoName: '',

            // 开户支行回显
            openCollectBankCodeName: '',

            // 开户总行回显
            listData_OneStatus: [['是', '否']],

            // 三证合一
            isShowOneStatus: false,

            // 营业执照是否永久
            isperiodValidityStatus: false,

            // 身份证是否永久
            showabccl: false,

            // 是否展示补充材料
            isShowTypeList: false,

            // 是否展示经营类型
            isShowAreaCodeTree: false,

            // 是否展示省市区
            itemTypeIndex: 0,

            // 经营类型的下标
            indexDrovince: 0,

            // 店铺地址的下标
            indexCity: 0,

            // 店铺地址的下标
            indexProvince: 0,

            // 店铺地址的下标
            timeName: '',

            // 时间公共赋值变量
            searchSum: '',

            // 总行搜索
            searchSub: '',

            // 支行搜索
            searchList: '',

            // 公共展示的银行列表
            bankType: '',

            // 银行公共赋值变量
            bankIndex: 0,

            // 银行公共的下标
            typeArea: '',

            // 地区公共赋值变量
            isagentPeriodValidity: false,

            // 委托人身份证是否永久有效
            agentPeriodValidityStart: '',

            // 委托人身份证注册时间
            agentPeriodValidityEnd: '',

            // 委托人身份证注册时间
            priLicAgreement: '',

            // 对私结算授权书
            priLicAgreementUrl: '',

            // 对私结算授权书
            extra1: '',

            // 补充材料
            extra2: '',

            // 补充材料
            extra3: '',

            // 补充材料
            extra1Url: '',

            // 补充材料
            extra2Url: '',

            // 补充材料
            extra3Url: '',

            // 补充材料
            formatter(type, value) {
                if (type === 'year') {
                    return `${value}年`;
                }

                if (type === 'month') {
                    return `${value}月`;
                }

                if (type === 'day') {
                    return `${value}日`;
                }

                return value;
            },

            mchtCnShortNameReadonly: false,
            scopesTypeNameReadonly: false,
            areaJsonNameReadonly: false,
            addressReadonly: false,
            shopFrontImgReadonly: false,
            shopInnerImgReadonly: false,
            checkstandImgReadonly: false,
            licenseReadonly: false,
            licNoReadonly: false,
            mchtNameReadonly: false,
            registeredAddressReadonly: false,
            businessStatusReadonly: false,
            businessTermstartReadonly: false,
            businessTermendReadonly: false,
            threeCertificatesInOneStatusReadonly: false,
            taxImageReadonly: false,
            orgImageReadonly: false,
            idCardFrontReadonly: false,
            idCardBackReadonly: false,
            personWithIdCardReadonly: false,
            userNameReadonly: false,
            userCardNoReadonly: false,
            isperiodValidityStatusReadonly: false,
            periodValiditystartReadonly: false,
            periodValidityendReadonly: false,
            userPhoneReadonly: false,
            bankCardReadonly: false,
            accountNoReadonly: false,
            accountNameReadonly: false,
            resserveMobileReadonly: false,
            zbankRegionCodeZNameReadonly: false,
            zbankRegionCodeSiteNameReadonly: false,
            zbankNoNameReadonly: false,
            openAccountLicensesReadonly: false,
            openBankAccNameReadonly: false,
            openBankAccoutReadonly: false,
            openCollectBankCodeNameReadonly: false,
            openUnionNoSiteNameReadonly: false,
            openUnionNoNameReadonly: false,
            agentIdCardFrontReadonly: false,
            agentIdCardBackReadonly: false,
            agentProtocolReadonly: false,
            holdAgentProtocolReadonly: false,
            agentCardNoReadonly: false,
            isagentPeriodValidityReadonly: false,
            agentPeriodValidityStartReadonly: false,
            agentPeriodValidityEndReadonly: false,
            priLicAgreementReadonly: false,
            zbankRegionCodeZNameReadonly: false,
            zbankRegionCodeSiteNameReadonly: false,
            zbankNoNameReadonly: false,
            TimeID: -1,
            show: false,
            isShowTime: false,
            tbStoreBoxBank: [],
            storeBoxBankZList: [],
            searchValue: '',
            zbankRegionCodeSiteName: '',
            isShowBank: false,
            siteListDrovinc: [],
            instanceInfo: '',
            zbankRegionCodeZName: '',
            value: '',
            minDate: ''
        };
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
        const { account, main } = options;
        console.log(options); // 经营范围树状集合

        _request.get('/box/getBusinessScopeTree', {}).then((res) => {
            if (res.data.code === 200) {
                const data = res.data.data;
                this.setData({
                    scopesList: data,
                    scopesSubclassList: data[0].children
                });
            }
        }); // 地区信息表获取省市区树列表

        _request.get('/box/getAreaCodeTree', {}).then((res) => {
            if (res.data.code === 200) {
                const data = res.data.data;
                this.setData({
                    siteList: data,
                    siteListCity: data[0].children,
                    siteListDrovince: data[0].children[0].children
                });
            }
        }); // 总行信息列表

        this.getStoreBoxHeadBankList(); // 获取进件（盒子商户）信息

        _request
            .get('/box/getIncoming', {
                storeId: uni.getStorageSync('crm_storeId') || uni.getStorageSync('storeId')
            })
            .then((res) => {
                if (res.data.code === 200) {
                    const data = res.data.data;
                    this.setData({
                        incomingInfo: data
                    }); // isRealName (integer, optional): 是否实名 1-未实名 2-已提交
                    // status (integer, optional): 审核状态 1- 待审核 2 -审核中 3 -审核被拒绝 4 -审核通过 5-审核异常

                    if (data.isRealName == 2 && (data.status == 3 || data.status == 1)) {
                        // 时间处理
                        const businessTerm = data.businessTerm.split('-');
                        const periodValidity = data.periodValidity.split('-');
                        const agentPeriodValidity = data.agentPeriodValidity ? data.agentPeriodValidity.split('-') : [];
                        let exList;
                        let exUrlList;
                        this.setData({
                            ...data,
                            ...data.storeBoxAttachDTO,
                            businessTermstart: businessTerm[0],
                            businessTermend: businessTerm[1],
                            periodValiditystart: periodValidity[0],
                            periodValidityend: periodValidity[1],
                            agentPeriodValidityStart: agentPeriodValidity[0],
                            agentPeriodValidityEnd: agentPeriodValidity[1],
                            threeCertificatesInOneStatus: data.threeCertificatesInOneStatus == '1' ? '是' : '否',
                            businessStatus: businessTerm[1] == '99990101' ? true : false,
                            isperiodValidityStatus: periodValidity[1] == '99990101' ? true : false,
                            isagentPeriodValidity: agentPeriodValidity[1] == '99990101' ? true : false,
                            licenceType: main == '企业' ? '0' : '1',
                            accountType: account == '对公' ? '0' : '1',
                            accountProxy: account == '非法人' ? '1' : '0'
                        });

                        if (data.storeBoxAttachDTO.extra1 != null && data.storeBoxAttachDTO.extra1) {
                            exList = JSON.parse(data.storeBoxAttachDTO.extra1);
                            exUrlList = JSON.parse(data.storeBoxAttachDTO.extra1Url);
                            this.setData({
                                extra1: exList[0]?.value,
                                // 补充材料
                                extra2: exList[1]?.value,
                                // 补充材料
                                extra3: exList[2]?.value,
                                // 补充材料
                                extra1Url: exUrlList[0]?.value,
                                // 补充材料
                                extra2Url: exUrlList[1]?.value,
                                // 补充材料
                                extra3Url: exUrlList[2]?.value // 补充材料
                            });
                        }
                    }
                }
            }); // 后面赋值，不然导致 accountType，accountProxy，重定向

        this.setData(
            {
                account,
                main,
                mainOld: main,
                licenceType: main == '企业' ? '0' : '1',
                accountType: account == '对公' ? '0' : '1',
                accountProxy: account == '非法人' ? '1' : '0',
                show: true
            },
            () => {
                // 动态设置title
                uni.setNavigationBarTitle({
                    title: main == '个体' ? '个体工商户' + '（' + account + '）' : main + '（' + account + '）'
                }); // 不同的主体和结算方式对应相对的步骤

                if ((main == '个体' && account == '非法人') || (main == '企业' && account == '法人')) {
                    this.setData({
                        steps: [1, 2, 3, 4, 5]
                    });
                } else if ((main == '个体' && account != '非法人') || (main == '企业' && account == '对公')) {
                    this.setData({
                        steps: [1, 2, 3, 4]
                    });
                } else if (main == '企业' && account == '非法人') {
                    this.setData({
                        steps: [1, 2, 3, 4, 5, 6]
                    });
                } else if (main == '小微商户' && account == '法人') {
                    this.setData({
                        steps: [1, 2, 3]
                    });
                }
            }
        );
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {
        this.getinstanceInfo();
    },
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh() {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom() {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage() {},
    methods: {
        // 时间公共赋值
        onConfirm(e, _dataset) {
            /* ---处理dataset begin--- */
            this.datasetHandle(e, _dataset);
            /* ---处理dataset end--- */
            const name = this.timeName;
            console.log(e, name);
            this.timeName = moment(e.detail).format('YYYYMMDD');
            this.setData({
                isShowTime: false
            }); // 禁止结束时间大于开始时间
            // if (name.indexOf('start') > -1) {
            //   this.setData({
            //     minDate: e.detail
            //   })
            // } else {
            //   console.log(name.split('end'));
            // }
        },

        //下载pdf
        onDown() {
            const url = this.account == '法人' ? 'https://iboxpay.kf5.com/hc/kb/article/1521604/' : 'https://iboxpay.kf5.com/hc/kb/article/1472077/';
            uni.showToast({
                title: '复制成功,请在浏览器打开'
            });
            uni.setClipboardData({
                data: url,
                success: function (res) {
                    uni.getClipboardData({
                        //这个api是把拿到的数据放到电脑系统中的
                        success: function (res) {}
                    });
                }
            }); // const url = this.data.account == '法人' ? 'https://kjyiyue.oss-cn-shenzhen.aliyuncs.com/shopimages/%E5%AF%B9%E7%A7%81%E9%9D%9E%E6%B3%95%E4%BA%BA%E7%BB%93%E7%AE%97%E6%8E%88%E6%9D%83%E4%B9%A6.docx' : 'https://kjyiyue.oss-cn-shenzhen.aliyuncs.com/shopimages/%E4%BC%81%E4%B8%9A%E6%B3%95%E4%BA%BA%E5%AF%B9%E7%A7%81%E5%B8%90%E6%88%B7%E7%BB%93%E7%AE%97%E6%8E%88%E6%9D%83%E4%B9%A6.docx'
            // let that = this;
            // wx.showLoading({
            //   title: '正在下载...',
            //   mask: true
            // })
            // wx.downloadFile({
            //   url: url,
            //   header: {},
            //   success: function (res) {
            //     if (res.statusCode === 200 && res.tempFilePath) {
            //       const FileSystemManager = wx.getFileSystemManager();
            //       const path = wx.env.USER_DATA_PATH + "/结算协议书" + ".docx";
            //       FileSystemManager.saveFile({
            //         tempFilePath: res.tempFilePath,
            //         filePath: path,
            //         success(res2) {
            //           console.log('savedFilePath:', res2, path)
            //           if (res2.errMsg == 'saveFile:ok') {
            //             wx.showToast({
            //               title: '下载成功, 保存路径: ' + path,
            //               icon: 'none'
            //             })
            //             wx.openDocument({
            //               filePath: path,
            //               fileType: 'docx'
            //             })
            //           } else {
            //             wx.showToast({
            //               title: '保存失败!',
            //               icon: 'none'
            //             })
            //           }
            //         }
            //       })
            //     } else {
            //       wx.showToast({
            //         title: '下载失败!',
            //         icon: 'none'
            //       })
            //     }
            //   },
            //   fail: function (e) {
            //     wx.showToast({
            //       title: '下载失败!',
            //       icon: 'none'
            //     })
            //   },
            //   complete: function () {
            //     wx.hideLoading()
            //   }
            // })
        },

        // 查看更多详情擅长
        toMoreadept() {
            this.setData({
                showabccl: !this.showabccl
            });
        },

        // 营业执照是否为三证合一
        showPicker_OneStatus(e, _dataset) {
            /* ---处理dataset begin--- */
            this.datasetHandle(e, _dataset);
            /* ---处理dataset end--- */
            const name = e.currentTarget.dataset.name; // 二审字段校验是否能修改

            if (this[name + 'Readonly']) {
                uni.showToast({
                    title: '该内容合格无需修改，请修改不合格内容。',
                    icon: 'none',
                    duration: 1500
                });
                return;
            }

            this.setData({
                isShowOneStatus: true
            });
        },

        sureCallBack_OneStatus(e) {
            let data = e.detail;
            this.setData({
                isShowOneStatus: false,
                threeCertificatesInOneStatus: e.detail.choosedData
            });
        },

        cancleCallBack_OneStatus() {
            this.setData({
                isShowOneStatus: false
            });
        },

        //点击图片进行预览，长按保存分享图片
        previewImg(e) {
            uni.previewImage({
                current: e.currentTarget.dataset.item,
                // 当前显示图片的http链接
                urls: [e.currentTarget.dataset.item] // 需要预览的图片http链接列表
            });
        },

        // 上一步
        onBack() {
            if (this.tab == 2 && this.mainOld == '小微商户') {
                this.setData({
                    tab: this.tab - 2
                });
            } else {
                this.setData({
                    tab: this.tab - 1
                });
            }
        },

        // 下一步
        onNext(e) {
            const name = e.currentTarget.dataset.name; // 步骤123都是公共参数

            const {
                tab,
                account,
                main,
                mchtCnShortName,
                businessId,
                areaNo,
                address,
                shopFrontImgUrl,
                shopInnerImgUrl,
                checkstandImgUrl,
                licenseUrl,
                licNo,
                mchtName,
                registeredAddress,
                businessStatus,
                businessTermstart,
                businessTermend,
                threeCertificatesInOneStatus,
                taxImageUrl,
                orgImageUrl,
                idCardFrontUrl,
                idCardBackUrl,
                personWithIdCardUrl,
                userName,
                userCardNo,
                isperiodValidityStatus,
                periodValiditystart,
                periodValidityend,
                bankCardUrl,
                accountNo,
                accountName,
                resserveMobile,
                zbankRegionCodeZName,
                zbankRegionCodeSiteName,
                zbankNoName,
                openAccountLicensesUrl,
                openBankAccout,
                openBankAccName,
                openCollectBankCodeName,
                openUnionNoName,
                agentIdCardBackUrl,
                agentIdCardFrontUrl,
                agentProtocolUrl,
                holdAgentProtocolUrl,
                agentCardNo,
                isagentPeriodValidity,
                agentPeriodValidityStart,
                agentPeriodValidityEnd,
                openUnionNoSiteName,
                userPhone,
                priLicAgreementUrl
            } = this;
            const licNoRule = /^[A-Za-z0-9]*$/;
            const isNumber = /^[0-9]*$/;
            const regIDCard = /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/;

            switch (tab) {
                case 0:
                    if (!mchtCnShortName || mchtCnShortName.length < 4 || mchtCnShortName.length > 12) {
                        uni.showToast({
                            title: mchtCnShortName ? '请输入4-12位的商户简称' : '请输入商户简称',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!businessId) {
                        uni.showToast({
                            title: '请选择经营范围',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!areaNo) {
                        uni.showToast({
                            title: '请选择店铺地址',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!address) {
                        uni.showToast({
                            title: '请输入详情地址',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!shopFrontImgUrl) {
                        uni.showToast({
                            title: '请上传店铺门头照',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!shopInnerImgUrl) {
                        uni.showToast({
                            title: '请上传店铺全景照',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!checkstandImgUrl) {
                        uni.showToast({
                            title: '请上传店铺收银台照',
                            icon: 'none',
                            duration: 1500
                        });
                    } else {
                        const num = this.mainOld == '小微商户' ? 2 : 1;
                        this.setData({
                            tab: this.tab + num
                        });
                    }

                    break;

                case 1:
                    if (!licenseUrl) {
                        uni.showToast({
                            title: '请上传营业证书照',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!licNo || !licNoRule.test(licNo)) {
                        uni.showToast({
                            title: !licNo ? '请输入营业执照注册号' : '营业执照需为数字和字母',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!mchtName) {
                        uni.showToast({
                            title: '请输入公司名称',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!registeredAddress) {
                        uni.showToast({
                            title: '请输入注册地址',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!businessTermstart) {
                        uni.showToast({
                            title: '请选择注册开始日期',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!businessStatus && !businessTermend) {
                        uni.showToast({
                            title: '请选择注册结束日期',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (account != '对公' && threeCertificatesInOneStatus == '否' && !taxImageUrl) {
                        uni.showToast({
                            title: '请上传组织机构代码照',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (account != '对公' && threeCertificatesInOneStatus == '否' && !orgImageUrl) {
                        uni.showToast({
                            title: '请上传税务登记证照',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (account == '法人' && !mchtCnShortName) {
                        uni.showToast({
                            title: '请输入组织机构代码',
                            icon: 'none',
                            duration: 1500
                        });
                    } else {
                        this.setData({
                            tab: this.tab + 1
                        });
                    }

                    break;

                case 2:
                    if (!idCardFrontUrl) {
                        uni.showToast({
                            title: '请上传身份证人像脸照',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!idCardBackUrl) {
                        uni.showToast({
                            title: '请上传身份证国徽脸照',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!personWithIdCardUrl && main != '企业') {
                        uni.showToast({
                            title: '请上传手持身份证照',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!userName) {
                        uni.showToast({
                            title: '请输入姓名',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!userCardNo || !regIDCard.test(userCardNo)) {
                        uni.showToast({
                            title: !userCardNo ? '请输入身份证号' : '请输入正确法人身份证号',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!periodValiditystart) {
                        uni.showToast({
                            title: '请选择起始有效期',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!isperiodValidityStatus && !periodValidityend) {
                        uni.showToast({
                            title: '请选择结束有效期',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!userPhone || userPhone.length != 11) {
                        uni.showToast({
                            title: !userPhone ? '请输入法人手机号' : '请输入11位法人手机号',
                            icon: 'none',
                            duration: 1500
                        });
                    } else {
                        // 这里转变下main属性，让小微企业走个体法人的判断,可以少去很多判断
                        this.setData({
                            tab: this.tab + 1,
                            main: this.main == '小微商户' ? '个体' : this.main
                        });
                    }

                    break;

                case 3:
                    if (tab == 3 && main == '个体' && account != '对公') {
                        if (!bankCardUrl) {
                            uni.showToast({
                                title: '请上传银行卡正面照',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!accountNo || !isNumber.test(accountNo)) {
                            uni.showToast({
                                title: accountNo ? '银行卡卡号需为数字' : '请输入银行账号',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!accountName) {
                            uni.showToast({
                                title: '请输入开户名',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!resserveMobile || resserveMobile.length != 11) {
                            uni.showToast({
                                title: !resserveMobile ? '请输入预留手机号' : '请输入11位预留手机号',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!zbankRegionCodeZName) {
                            uni.showToast({
                                title: '请选择开户银行',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!zbankRegionCodeSiteName) {
                            uni.showToast({
                                title: '请选择开户地址',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!zbankNoName) {
                            uni.showToast({
                                title: '请选择开户支行',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (name == '完成') {
                            this.onAMerchantEntry();
                        } else {
                            this.setData({
                                tab: this.tab + 1
                            });
                        }
                    } else if (main == '企业' || (main == '个体' && account == '对公')) {
                        if (!openAccountLicensesUrl) {
                            uni.showToast({
                                title: '请上传开户许可证照',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!openBankAccName) {
                            uni.showToast({
                                title: '请输入开户名',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!openBankAccout || !isNumber.test(openBankAccout)) {
                            uni.showToast({
                                title: openBankAccout ? '银行卡卡号需为数字' : '请输入银行卡号',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!openCollectBankCodeName) {
                            uni.showToast({
                                title: '请选择开户银行',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!openUnionNoSiteName) {
                            uni.showToast({
                                title: '请选择开户地址',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!openUnionNoName) {
                            uni.showToast({
                                title: '请选择开户支行',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (name == '完成') {
                            this.onAMerchantEntry();
                        } else {
                            this.setData({
                                tab: this.tab + 1
                            });
                        }
                    }

                    break;

                case 4:
                    if (account != '法人') {
                        if (!agentIdCardBackUrl) {
                            uni.showToast({
                                title: '请上传被委托人身份证人像面照',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!agentIdCardFrontUrl) {
                            uni.showToast({
                                title: '请上传被委托人身份证国徽面照',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!agentProtocolUrl) {
                            uni.showToast({
                                title: '请上传委托结算授权书照',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!holdAgentProtocolUrl) {
                            uni.showToast({
                                title: '请上传法人手持委托清算协议照',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!accountName) {
                            uni.showToast({
                                title: '请输入姓名',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!agentCardNo || !regIDCard.test(agentCardNo)) {
                            uni.showToast({
                                title: !agentCardNo ? '请输入身份证号' : '请输入正确法人身份证号',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!agentPeriodValidityStart) {
                            uni.showToast({
                                title: '请选择起始有效期',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!isagentPeriodValidity && !agentPeriodValidityEnd) {
                            uni.showToast({
                                title: '请选择结束有效期',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (name == '完成') {
                            this.onAMerchantEntry();
                        } else {
                            this.setData({
                                tab: this.tab + 1
                            });
                        }
                    } else if (account == '法人') {
                        if (!bankCardUrl) {
                            uni.showToast({
                                title: '请上传银行卡正面照',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!priLicAgreementUrl) {
                            uni.showToast({
                                title: '请上传对私结算授权书照',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!accountNo || !isNumber.test(accountNo)) {
                            uni.showToast({
                                title: accountNo ? '银行卡卡号需为数字' : '请输入银行账号',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!accountName) {
                            uni.showToast({
                                title: '请输入开户名',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!resserveMobile || resserveMobile.length != 11) {
                            uni.showToast({
                                title: !resserveMobile ? '请输入预留手机号' : '请输入11位预留手机号',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!zbankRegionCodeZName) {
                            uni.showToast({
                                title: '请选择开户银行',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!zbankRegionCodeSiteName) {
                            uni.showToast({
                                title: '请选择开户地址',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (!zbankNoName) {
                            uni.showToast({
                                title: '请选择开户支行',
                                icon: 'none',
                                duration: 1500
                            });
                        } else if (name == '完成') {
                            this.onAMerchantEntry();
                        } else {
                            this.setData({
                                tab: this.tab + 1
                            });
                        }
                    }

                    break;

                case 5:
                    if (!bankCardUrl) {
                        uni.showToast({
                            title: '请上传银行卡正面照',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!accountNo || !isNumber.test(accountNo)) {
                        uni.showToast({
                            title: accountNo ? '银行卡卡号需为数字' : '请输入银行账号',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!accountName) {
                        uni.showToast({
                            title: '请输入开户名',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!resserveMobile || resserveMobile.length != 11) {
                        uni.showToast({
                            title: !resserveMobile ? '请输入预留手机号' : '请输入11位预留手机号',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!zbankRegionCodeZName) {
                        uni.showToast({
                            title: '请选择开户银行',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!zbankRegionCodeSiteName) {
                        uni.showToast({
                            title: '请选择开户地址',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (!zbankNoName) {
                        uni.showToast({
                            title: '请选择开户支行',
                            icon: 'none',
                            duration: 1500
                        });
                    } else if (name == '完成') {
                        this.onAMerchantEntry();
                    } else {
                        this.setData({
                            tab: this.tab + 1
                        });
                    }

                    break;

                default:
                    break;
            }
        },

        // input 公共赋值
        onChange(e, _dataset) {
            /* ---处理dataset begin--- */
            this.datasetHandle(e, _dataset);
            /* ---处理dataset end--- */
            const name = e.currentTarget.dataset.name;
            this[e.currentTarget.dataset.name] = e.detail;
        },

        // 图片公共上传
        onDownImg(e) {
            const name = e.currentTarget.dataset.name;
            const vm = this; // 二审字段校验是否能修改

            if (this[name + 'Readonly']) {
                uni.showToast({
                    title: '该内容合格无需修改，请修改不合格内容。',
                    icon: 'none',
                    duration: 1500
                });
                return;
            }

            uni.chooseMedia({
                count: 1,
                mediaType: ['image'],

                success(res) {
                    console.log(res);
                    const tempFilePaths = res.tempFiles[0].tempFilePath;
                    uni.uploadFile({
                        url: vm.baseurl + '/store-api/box/boxFileUpload',
                        filePath: tempFilePaths,
                        name: 'file',
                        header: {
                            token: uni.getStorageSync('token') || null
                        },
                        formData: {
                            file: 'file'
                        },

                        success(res) {
                            const resNew = JSON.parse(res.data);

                            if (resNew.code == 200) {
                                const data = resNew.data;
                                vm.nameUrl = data.url;
                                vm[e.currentTarget.dataset.name] = data.boxFileName;
                            } else {
                                uni.showToast({
                                    title: '上传失败',
                                    icon: 'none'
                                });
                            }

                            console.log(vm);
                        },

                        fail(error) {},

                        complete(res) {}
                    });
                }
            });
        },

        // 公共关闭弹窗
        onClickHide(e, _dataset) {
            /* ---处理dataset begin--- */
            this.datasetHandle(e, _dataset);
            /* ---处理dataset end--- */
            const name = e.currentTarget.dataset.name;
            this[e.currentTarget.dataset.name] = false;
        },

        // 公共打开弹窗
        onshowModal(e, _dataset) {
            /* ---处理dataset begin--- */
            this.datasetHandle(e, _dataset);
            /* ---处理dataset end--- */
            const name = e.currentTarget.dataset.name;
            const boolname = e.currentTarget.dataset.boolname;
            const vm = this; // 二审字段校验是否能修改

            if (this[boolname + 'Readonly']) {
                uni.showToast({
                    title: '该内容合格无需修改，请修改不合格内容。',
                    icon: 'none',
                    duration: 1500
                });
                return;
            } // 时间弹窗额外处理，公共赋值变量

            if (e.currentTarget.dataset.timename) {
                const timeName = e.currentTarget.dataset.timename;
                this.setData({
                    timeName
                }); // 禁止结束时间大于开始时间
                // if (timeName.indexOf('start') > -1) {
                //   this.setData({
                //     minDate: ''
                //   })
                // } else {
                //   this.setData({
                //     minDate: moment(this.data[timeName.split('end')[0] + 'start']).valueOf()
                //   })
                // }
            } // 地区弹窗额外处理，公共赋值变量

            if (e.currentTarget.dataset.type) {
                this.setData({
                    typeArea: e.currentTarget.dataset.type
                });
            } // 银行弹窗额外处理，公共赋值变量

            const bank = e.currentTarget.dataset.bank;

            if (bank) {
                this.setData(
                    {
                        bankType: bank,
                        tbStoreBoxBank: [],
                        // 开户银行
                        storeBoxBankZList: [],
                        // 开户支银行list
                        searchValue: '',
                        searchSum: '',
                        // 总行搜索
                        searchSub: '' // 支行搜索
                    },
                    () => {
                        if (bank == 'tbStoreBoxBank' || bank == 'zbankRegionCodeZ') {
                            vm.getStoreBoxHeadBankList();
                        }
                    }
                );
            } // 最后再执行展示，前面涉及一些条件判断

            if ((!vm.openCollectBankCodeName && bank == 'storeBoxBankZList') || (!vm.openUnionNoZName && bank == 'openUnionNo')) {
                uni.showToast({
                    title: '请先选择开户总行',
                    icon: 'none',
                    duration: 1000
                });
            } else {
                vm[e.currentTarget.dataset.name] = true;
            }
        },

        // 选择银行
        bindChangeBank(e) {
            const bankIndex = e.detail.value[0];
            this.setData({
                bankIndex
            });
        },

        // 确认选择银行
        sureBank() {
            const { searchList, bankIndex, bankType } = this;
            const vm = this;
            let name;
            let id = '';

            if (bankType == 'tbStoreBoxBank') {
                name = 'openCollectBankCodeName';
                id = 'openCollectBankCode';
                vm.setData({
                    openUnionNoSiteName: '',
                    openUnionNoName: ''
                });
            } else if (bankType == 'storeBoxBankZList') {
                name = 'openUnionNoName';
                id = 'openUnionNo';
            } else if (bankType == 'zbankRegionCodeZ') {
                name = 'zbankRegionCodeZName';
                id = 'zbankRegionCodeZ';
                vm.setData({
                    zbankRegionCodeSiteName: '',
                    zbankNoName: ''
                });
            } else if (bankType == 'zbankRegionCode') {
                name = 'zbankNoName';
                id = 'zbankNo';
            }

            this.name = searchList[bankIndex].name || searchList[bankIndex].branchName;

            this.setData(
                {
                    isShowBank: false
                },
                () => {
                    // 总行发生改变去请求支行列表
                    if (bankType == 'tbStoreBoxBank' || bankType == 'zbankRegionCodeZ') {
                        vm.getStoreBoxBankList();
                    }
                }
            );
        },

        // 银行搜索
        onSearch(e) {
            const { bankType } = this;
            const value = e.detail;
            console.log(bankType);
            const vm = this;
            let name = '';

            if (bankType == 'tbStoreBoxBank' || bankType == 'zbankRegionCodeZ') {
                name = 'searchSum';
            } else if (bankType == 'storeBoxBankZList' || bankType == 'zbankRegionCode') {
                name = 'searchSub';
            }

            this.setData({}, () => {
                clearTimeout(vm.TimeID);
                vm.TimeID = setTimeout(() => {
                    if (bankType == 'tbStoreBoxBank' || bankType == 'zbankRegionCodeZ') {
                        vm.getStoreBoxHeadBankList();
                    } else if (bankType == 'storeBoxBankZList' || bankType == 'zbankRegionCode') {
                        vm.getStoreBoxBankList();
                    }
                }, 1000);
            });
        },

        // 公共状态开关
        onChangeStatus(e, _dataset) {
            /* ---处理dataset begin--- */
            this.datasetHandle(e, _dataset);
            /* ---处理dataset end--- */
            const name = e.currentTarget.dataset.name; // 二审字段校验是否能修改

            if (this[name + 'Readonly']) {
                uni.showToast({
                    title: '该内容合格无需修改，请修改不合格内容。',
                    icon: 'none',
                    duration: 1500
                });
                return;
            }

            this[e.currentTarget.dataset.name] = !this[name];

            if (name == 'businessStatus') {
                this.setData({
                    businessTermstart: '',
                    businessTermend: ''
                });
            }

            if (name == 'isperiodValidityStatus') {
                this.setData({
                    periodValiditystart: '',
                    periodValidityend: ''
                });
            }

            if (name == 'isagentPeriodValidity') {
                this.setData({
                    agentPeriodValidityStart: '',
                    agentPeriodValidityEnd: ''
                });
            }
        },

        // 选择经营类型
        bindChangeTypeList(e) {
            const { scopesList } = this;
            const index = e.detail.value[0];
            const itemTypeIndex = e.detail.value[1];
            this.setData({
                scopesSubclassList: scopesList[index].children,
                itemTypeIndex
            });
        },

        // 确认选择经营类型
        sure() {
            const { scopesSubclassList, itemTypeIndex } = this;
            this.setData({
                businessId: scopesSubclassList[itemTypeIndex].businessId,
                scopesTypeName: scopesSubclassList[itemTypeIndex].categoryName,
                isShowTypeList: false
            });
        },

        // 选择地址
        bindChangeAreaCodeTree(e) {
            const { siteList, siteListCity, siteListDrovince } = this;
            const indexProvince = e.detail.value[0];
            const indexCity = e.detail.value[1];
            const indexDrovince = e.detail.value[2];
            this.setData(
                {
                    siteListCity: siteList[indexProvince].children,
                    indexProvince,
                    indexCity,
                    indexDrovince,
                    siteListDrovinc: []
                },
                () => {
                    // 异步赋值
                    this.setData({
                        siteListDrovince: this.siteListCity[indexCity].children
                    });
                }
            );
        },

        // 确认选择地址
        sureAreaCodeTree() {
            const { indexProvince, indexCity, indexDrovince, siteListCity, siteListDrovince, siteList, typeArea } = this;
            const vm = this;
            let areaNo;
            let provinceName = '';
            if (typeArea == 'dz') {
                areaNo = 'areaNo';
                provinceName = 'areaJsonName';
            } else if (typeArea == 'kh') {
                areaNo = 'zbankRegionCode';
                provinceName = 'zbankRegionCodeSiteName';
                vm.setData({
                    zbankNoName: ''
                });
            } else if (typeArea == 'kh_dg') {
                areaNo = 'openBankRegionCode';
                provinceName = 'openUnionNoSiteName';
                vm.setData({
                    openUnionNoName: ''
                });
            }

            if (siteListDrovince.length > 0) {
                this.areaNo = siteListDrovince[indexDrovince].code;
                this.setData(
                    {
                        isShowAreaCodeTree: false
                    },
                    () => {
                        if (typeArea != 'dz') {
                            vm.getStoreBoxBankList(siteList[indexProvince].name, siteListCity[indexCity].name);
                        }
                    }
                );
            } else {
                this.areaNo = siteListCity[indexCity].code;
                this.setData(
                    {
                        isShowAreaCodeTree: false
                    },
                    () => {
                        if (typeArea != 'dz') {
                            vm.getStoreBoxBankList(siteList[indexProvince].name, siteListCity[indexCity].name);
                        }
                    }
                );
            }
        },

        // 总行信息列表
        getStoreBoxHeadBankList() {
            _request
                .get('/box/getStoreBoxHeadBankList', {
                    search: this.searchSum
                })
                .then((res) => {
                    if (res.data.code === 200) {
                        const data = res.data.data;
                        this.setData({
                            searchList: data
                        });
                    }
                });
        },

        // 支行信息列表
        getStoreBoxBankList(provinceName, cityName) {
            const { bankType, openCollectBankCode, zbankRegionCodeZ } = this;
            console.log(this);
            let no = '';

            if (bankType == 'tbStoreBoxBank') {
                no = openCollectBankCode;
            } else if (bankType == 'zbankRegionCodeZ') {
                no = zbankRegionCodeZ;
            }

            _request
                .get('/box/getStoreBoxBankList', {
                    search: this.searchSub,
                    headBranchNo: no // provinceName: provinceName || '',
                    // cityName: cityName || '',
                })
                .then((res) => {
                    if (res.data.code === 200) {
                        const data = res.data.data;
                        this.setData({
                            searchList: data
                        });
                    }
                });
        },

        // 提交进件
        onAMerchantEntry() {
            const {
                incomingInfo,
                account,
                mchtCnShortName,
                // 商户简称
                businessId,
                // 经营范围businessId
                areaNo,
                // 区编码
                address,
                // 详情地址
                shopFrontImg,
                // 店铺照片门头
                shopInnerImg,
                // 店铺照片全景
                checkstandImg,
                // 店铺照片收银台
                shopFrontImgUrl,
                // 店铺照片门头
                shopInnerImgUrl,
                // 店铺照片全景
                checkstandImgUrl,
                // 店铺照片收银台
                licNo,
                // 营业执照注册号
                mchtName,
                // 公司名称
                registeredAddress,
                // 注册地址
                businessStatus,
                // 营业执照有效期
                businessTermstart,
                // 注册时间
                businessTermend,
                // 注册时间
                threeCertificatesInOneStatus,
                // 营业执照是否为三证合一
                license,
                //营业证书照片
                licenseUrl,
                //营业证书照片
                userName,
                //法人姓名
                userCardNo,
                //法人身份证号
                zbankRegionCodeSiteName,
                // 银行开户地址
                zbankRegionCodeZName,
                // 银行开户总行
                periodValidityStatus,
                //身份证有效期
                periodValiditystart,
                // 注册时间
                periodValidityend,
                // 注册时间
                personWithIdCard,
                // 手持身份证半照
                idCardFront,
                // 上传身份证正面
                idCardBack,
                // 上传身份证反面
                personWithIdCardUrl,
                // 手持身份证半照
                idCardFrontUrl,
                // 上传身份证正面
                idCardBackUrl,
                // 上传身份证反面
                accountType,
                // 账户类型 默认对公
                accountName,
                // 开户名
                accountNo,
                // 银行卡卡号
                openBankRegionCode,
                // 开户许可证总银行地区
                openCollectBankCode,
                // 开户许可证总银行
                openUnionNo,
                // 开户许可证支行 对公
                zbankNo,
                //  开户支银行
                zbankNoName,
                //  开户支银行回显
                zbankRegionCode,
                //开户支银行地区
                openAccountLicenses,
                // 开户许可证
                openAccountLicensesUrl,
                // 开户许可证
                bankCardUrl,
                //银行卡url
                bankCard,
                //银行卡url
                agentProtocolUrl,
                //委托结算协议
                agentProtocol,
                //委托结算协议
                resserveMobile,
                //预留手机号
                userPhone,
                //法人手机号
                licenceType,
                // 营业执类型
                accountProxy,
                // 是否是委托清算
                agentIdCardBack,
                // 委托人身份证人像面照
                agentIdCardBackUrl,
                // 委托人身份证人像面照
                agentIdCardFront,
                // 委托人身份证国徽面照
                agentIdCardFrontUrl,
                // 委托人身份证国徽面照
                holdAgentProtocol,
                // 手持委托清算
                holdAgentProtocolUrl,
                // 手持委托清算
                agentCardNo,
                //被委托人身份证
                scopesTypeName,
                // 经营范围回显
                subclassTypeName,
                // 经营范围回显
                areaJsonName,
                // 省市区回显
                provinceBankRegionName,
                // 开户省市区回显
                mchtNo,
                // 重新提交必传
                isagentPeriodValidity,
                // 委托人身份证是否永久有效
                agentPeriodValidityStart,
                // 委托人身份证注册时间
                agentPeriodValidityEnd,
                // 委托人身份证注册时间
                isShowOneStatus,
                // 营业执照是否永久
                isperiodValidityStatus,
                // 身份证是否永久
                openBankAccName,
                // 开户许可证-开户名
                openBankAccout,
                // 开户许可证-银行卡号
                openUnionNoSiteName,
                // 开户许可证省市区回显
                openUnionNoName,
                // 开户许可证支行回显
                openCollectBankCodeName,
                // 开户许可证总行回显
                extra1,
                // 补充材料
                extra2,
                // 补充材料
                extra3,
                // 补充材料
                extra1Url,
                // 补充材料
                extra2Url,
                // 补充材料
                extra3Url,
                // 补充材料
                priLicAgreementUrl,
                // 对私结算授权书
                priLicAgreement,
                // 对私结算授权书
                mainOld
            } = this; // isRealName 是否实名 1-未实名 2-已提交

            const url = incomingInfo.isRealName == 1 ? '/box/createAMerchantEntry' : '/box/updateAMerchantEntry';
            const businessTerm =
                threeCertificatesInOneStatus == '是' || threeCertificatesInOneStatus == 1 ? businessTermstart + '-99990101' : businessTermstart + '-' + businessTermend;
            const periodValidity = isperiodValidityStatus ? periodValiditystart + '-99990101' : periodValiditystart + '-' + periodValidityend;
            const agentPeriodValidity = isagentPeriodValidity ? agentPeriodValidityStart + '-99990101' : agentPeriodValidityStart + '-' + agentPeriodValidityEnd;
            const extra1List = [
                {
                    name: 'extra1',
                    value: extra1
                },
                {
                    name: 'extra2',
                    value: extra2
                },
                {
                    name: 'extra3',
                    value: extra3
                }
            ];
            const extra1UrlList = [
                {
                    name: 'extra1Url',
                    value: extra1Url
                },
                {
                    name: 'extra2Url',
                    value: extra2Url
                },
                {
                    name: 'extra3Url',
                    value: extra3Url
                }
            ];
            let obj = null;

            if (mainOld == '小微商户') {
                obj = {
                    channelKind: mainOld == '小微商户' ? '000001' : '000002',
                    businessStatus: isShowOneStatus ? 1 : 2,
                    periodValidityStatus: isperiodValidityStatus ? 1 : 2,
                    mchtCnShortName,
                    businessId,
                    areaNo,
                    address,
                    mchtName: mainOld == '小微商户' ? mchtCnShortName : mchtName,
                    registeredAddress,
                    businessTerm,
                    threeCertificatesInOneStatus: threeCertificatesInOneStatus == '是' ? '1' : '2',
                    userName,
                    licenceType,
                    licNo: '',
                    userCardNo,
                    periodValidity,
                    accountType,
                    accountName: account == '对公' ? openBankAccName : accountName,
                    accountNo: account == '对公' ? openBankAccout : accountNo,
                    openBankRegionCode,
                    openCollectBankCode,
                    zbankNo: account == '对公' ? openUnionNo : zbankNo,
                    zbankRegionCode: account == '对公' ? openBankRegionCode : zbankRegionCode,
                    resserveMobile,
                    userPhone,
                    mchtNo,
                    openUnionNo,
                    openUnionNoSiteName,
                    // 开户许可证省市区回显
                    openBankAccName,
                    openBankAccout,
                    zbankRegionCodeSiteName,
                    zbankRegionCodeZName,
                    openUnionNoName,
                    openCollectBankCodeName,
                    zbankNoName,
                    shopId: incomingInfo.shopId,
                    storeId: uni.getStorageSync('crm_storeId') || uni.getStorageSync('storeId'),
                    id: incomingInfo.id,
                    images: [
                        {
                            name: 'shopFrontImg',
                            value: shopFrontImg
                        },
                        {
                            name: 'shopInnerImg',
                            value: shopInnerImg
                        },
                        {
                            name: 'checkstandImg',
                            value: checkstandImg
                        },
                        {
                            name: 'personWithIdCard',
                            value: personWithIdCard
                        },
                        {
                            name: 'idCardFront',
                            value: idCardFront
                        },
                        {
                            name: 'idCardBack',
                            value: idCardBack
                        },
                        {
                            name: 'bankCard',
                            value: bankCard
                        },
                        ...extra1List
                    ],
                    req: {
                        shopFrontImg,
                        shopInnerImg,
                        checkstandImg,
                        shopFrontImgUrl,
                        shopInnerImgUrl,
                        checkstandImgUrl,
                        personWithIdCard,
                        idCardFront,
                        idCardBack,
                        personWithIdCardUrl,
                        idCardFrontUrl,
                        idCardBackUrl,
                        bankCardUrl,
                        bankCard,
                        openUnionNoName,
                        id: incomingInfo?.storeBoxAttachDTO ? incomingInfo.storeBoxAttachDTO.id : '',
                        storeBoxAuthenticateId: incomingInfo.id,
                        extra1: JSON.stringify(extra1List),
                        extra1Url: JSON.stringify(extra1UrlList)
                    },
                    scopesTypeName,
                    subclassTypeName,
                    areaJsonName,
                    areaJsonBankName: provinceBankRegionName,
                    areaJsonUnionNoSiteName: openUnionNoSiteName,
                    id: this.incomingInfo?.id
                };
            } else {
                obj = {
                    channelKind: mainOld == '小微商户' ? '000001' : '000002',
                    businessStatus: isShowOneStatus ? 1 : 2,
                    periodValidityStatus: isperiodValidityStatus ? 1 : 2,
                    mchtCnShortName,
                    businessId,
                    areaNo,
                    address,
                    licNo,
                    mchtName: mainOld == '小微商户' ? mchtCnShortName : mchtName,
                    registeredAddress,
                    businessTerm,
                    threeCertificatesInOneStatus: threeCertificatesInOneStatus == '是' ? '1' : '2',
                    userName,
                    userCardNo,
                    periodValidity,
                    accountType,
                    accountName: account == '对公' ? openBankAccName : accountName,
                    accountNo: account == '对公' ? openBankAccout : accountNo,
                    openBankRegionCode,
                    openCollectBankCode,
                    zbankNo: account == '对公' ? openUnionNo : zbankNo,
                    zbankRegionCode: account == '对公' ? openBankRegionCode : zbankRegionCode,
                    resserveMobile,
                    userPhone,
                    licenceType,
                    accountProxy,
                    agentCardNo,
                    mchtNo,
                    openUnionNo,
                    openUnionNoSiteName,
                    // 开户许可证省市区回显
                    openBankAccName,
                    openBankAccout,
                    zbankRegionCodeSiteName,
                    zbankRegionCodeZName,
                    openUnionNoName,
                    openCollectBankCodeName,
                    zbankNoName,
                    shopId: incomingInfo.shopId,
                    storeId: uni.getStorageSync('crm_storeId') || uni.getStorageSync('storeId'),
                    id: incomingInfo.id,
                    images: [
                        {
                            name: 'shopFrontImg',
                            value: shopFrontImg
                        },
                        {
                            name: 'shopInnerImg',
                            value: shopInnerImg
                        },
                        {
                            name: 'checkstandImg',
                            value: checkstandImg
                        },
                        {
                            name: 'license',
                            value: license
                        },
                        {
                            name: 'personWithIdCard',
                            value: personWithIdCard
                        },
                        {
                            name: 'idCardFront',
                            value: idCardFront
                        },
                        {
                            name: 'idCardBack',
                            value: idCardBack
                        },
                        {
                            name: 'openAccountLicenses',
                            value: openAccountLicenses
                        },
                        {
                            name: 'bankCard',
                            value: bankCard
                        },
                        {
                            name: 'agentIdCardBack',
                            value: agentIdCardBack
                        },
                        {
                            name: 'agentIdCardFront',
                            value: agentIdCardFront
                        },
                        {
                            name: 'holdAgentProtocol',
                            value: holdAgentProtocol
                        },
                        {
                            name: 'priLicAgreement',
                            value: priLicAgreement
                        },
                        ...extra1List
                    ],
                    req: {
                        shopFrontImg,
                        shopInnerImg,
                        checkstandImg,
                        shopFrontImgUrl,
                        shopInnerImgUrl,
                        checkstandImgUrl,
                        license,
                        licenseUrl,
                        personWithIdCard,
                        idCardFront,
                        idCardBack,
                        personWithIdCardUrl,
                        idCardFrontUrl,
                        idCardBackUrl,
                        openAccountLicenses,
                        openAccountLicensesUrl,
                        bankCardUrl,
                        bankCard,
                        agentProtocolUrl,
                        agentProtocol,
                        agentIdCardBack,
                        agentIdCardBackUrl,
                        agentIdCardFront,
                        agentIdCardFrontUrl,
                        holdAgentProtocol,
                        holdAgentProtocolUrl,
                        priLicAgreement,
                        priLicAgreementUrl,
                        openUnionNoName,
                        id: incomingInfo?.storeBoxAttachDTO ? incomingInfo.storeBoxAttachDTO.id : '',
                        storeBoxAuthenticateId: incomingInfo.id,
                        extra1: JSON.stringify(extra1List),
                        extra1Url: JSON.stringify(extra1UrlList)
                    },
                    scopesTypeName,
                    subclassTypeName,
                    areaJsonName,
                    areaJsonBankName: provinceBankRegionName,
                    areaJsonUnionNoSiteName: openUnionNoSiteName,
                    id: this.incomingInfo?.id
                };
            }

            const agenObj = {
                name: 'agentProtocol',
                value: agentProtocol
            };

            if (agentProtocol) {
                obj.agentPeriodValidity = agentPeriodValidity;
                obj.images = [...obj.images, agenObj];
            }

            console.log(JSON.stringify(obj));
            console.log(obj); // return false;
            // 进件请求

            _request.postObj(url, { ...obj }).then((res) => {
                if (res.data.code === 200) {
                    uni.showToast({
                        title: '申请成功',
                        icon: 'none'
                    });
                    setTimeout(() => {
                        uni.reLaunch({
                            url: '/pages/gatheringAuth/index'
                        });
                    }, 1000);
                } else if (res.data.code === 400) {
                    uni.showToast({
                        title: res.data.message,
                        icon: 'none',
                        duration: 2000
                    });
                }
            });
        },

        // 人工二审状态
        getinstanceInfo() {
            _request
                .get('/box/refreshSecondInstanceStatus', {
                    storeId: uni.getStorageSync('storeId')
                })
                .then((res) => {
                    if (res.data.code == 200) {
                        let boolObj = {
                            mchtCnShortNameReadonly: true,
                            scopesTypeNameReadonly: true,
                            areaJsonNameReadonly: true,
                            addressReadonly: true,
                            shopFrontImgReadonly: true,
                            shopInnerImgReadonly: true,
                            checkstandImgReadonly: true,
                            licenseReadonly: true,
                            licNoReadonly: true,
                            mchtNameReadonly: true,
                            registeredAddressReadonly: true,
                            businessStatusReadonly: true,
                            businessTermstartReadonly: true,
                            businessTermendReadonly: true,
                            threeCertificatesInOneStatusReadonly: true,
                            taxImageReadonly: true,
                            orgImageReadonly: true,
                            idCardFrontReadonly: true,
                            idCardBackReadonly: true,
                            personWithIdCardReadonly: true,
                            userNameReadonly: true,
                            userCardNoReadonly: true,
                            isperiodValidityStatusReadonly: true,
                            periodValiditystartReadonly: true,
                            periodValidityendReadonly: true,
                            userPhoneReadonly: true,
                            bankCardReadonly: true,
                            accountNoReadonly: true,
                            accountNameReadonly: true,
                            resserveMobileReadonly: true,
                            zbankRegionCodeZNameReadonly: true,
                            zbankRegionCodeSiteNameReadonly: true,
                            zbankNoNameReadonly: true,
                            openAccountLicensesReadonly: true,
                            openBankAccNameReadonly: true,
                            openBankAccoutReadonly: true,
                            openCollectBankCodeNameReadonly: true,
                            openUnionNoSiteNameReadonly: true,
                            openUnionNoNameReadonly: true,
                            agentIdCardFrontReadonly: true,
                            agentIdCardBackReadonly: true,
                            agentProtocolReadonly: true,
                            holdAgentProtocolReadonly: true,
                            agentCardNoReadonly: true,
                            isagentPeriodValidityReadonly: true,
                            agentPeriodValidityStartReadonly: true,
                            agentPeriodValidityEndReadonly: true,
                            priLicAgreementReadonly: true,
                            zbankRegionCodeZNameReadonly: true,
                            zbankRegionCodeSiteNameReadonly: true,
                            zbankNoNameReadonly: true
                        };
                        const data = res.data.data.data;
                        data.desc = JSON.parse(data.desc);
                        this.setData({
                            instanceInfo: data
                        }); // 包含的字段都设置成false

                        Object.keys(data.desc).map((e) => {
                            boolObj[e + 'Readonly'] = false;
                        }); // if (data.code == 3) {
                        //   // 验证门店是否二审，只能拒绝字段修改
                        //   this.setData({
                        //     ...boolObj
                        //   })
                        // }
                    }
                });
        },

        shop() {
            console.log('占位：函数 shop 未声明');
        }
    }
};
</script>
<style>
/* pages/gatheringAuth/auths/index.wxss */
page {
    background: #f5f5f5;
}

.steps {
    padding: 0 100rpx;
}

.steps .van-steps {
    background-color: #f5f5f5 !important;
}

.steps .van-steps--horizontal {
    padding: 0 !important;
    padding-bottom: 20rpx !important;
}

.van-step--horizontal .van-step__circle-container {
    background-color: #f5f5f5 !important;
}

.van-dialog__header {
    color: #ee0a24;
}

.van-button--large {
    color: rgb(230, 164, 22) !important;
}

.hr {
    border-top: 1rpx solid #d2d2d2;
    margin: 0 20rpx;
}

.text-r {
    color: #ee0a24;
    text-align: left;
    padding: 10rpx 0rpx;
    background: #fff;
    line-height: 40rpx;
    font-size: 24rpx;
}

.text-6 {
    color: #666;
    font-size: 24rpx;
    padding: 0 30rpx;
    line-height: 60rpx;
    width: 100%;
    box-sizing: border-box;
}

.text-xz {
    color: rgb(14, 129, 223);
    font-size: 24rpx;
    padding-right: 20rpx;
    line-height: 60rpx;
    width: 100%;
    text-align: right;
    box-sizing: border-box;
}

.custom-class {
    height: 100rpx !important;
}

.custom-class .van-cell__value {
    text-align: left !important;
    position: relative !important;
    left: -124rpx !important;
}

.first_btn {
    width: 670rpx;
    height: 88rpx;
    background: #ff8722;
    border-radius: 44px;
    line-height: 88rpx;
    margin: 40rpx 40rpx 10rpx 40rpx;
    color: #fff;
    text-align: center;
}

.imgbox {
    margin-top: 20rpx;
    padding: 20rpx 30rpx;
    box-sizing: border-box;
    background: #fff;
}

.imgitem {
    display: flex;
    justify-content: space-between;
    margin-top: 20rpx;
}

.imgitem > view {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    width: min-content;
}

.img_name {
    width: 100%;
    font-size: 24rpx;
    color: #666;
    line-height: 30rpx;
    text-align: center;
    margin-top: 10rpx;
    font-weight: 900;
}

.img_data {
    width: 300rpx;
    height: 200rpx;
    border-radius: 10px;
}

.combox {
    height: 60rpx;
    line-height: 60rpx;
    background: #fff;
    padding: 0 30rpx;
}

.text {
    color: var(--field-label-color, #646566);
    font-size: 14px;
}

.combtnbox {
    padding: 30rpx 40rpx;
    background: #fff;
    box-sizing: border-box;
}

.combtnbox > view {
    width: 300rpx;
    height: 66rpx;
    line-height: 66rpx;
    font-size: 24rpx;
    border-radius: 44px;
    text-align: center;
}

.com_s {
    border: 1px solid #ff8722;
    color: #ff8722;
}

.com_x {
    background: #ff8722;
    color: #fff;
}

.box {
    width: 100%;
    background: #fff;
    position: absolute;
    bottom: 0;
}

.pickerview {
    bottom: 88rpx;
    height: 300rpx;
    margin-bottom: 40rpx;
}

.picker-footer {
    width: 400rpx;
    height: 88rpx;
    box-sizing: border-box;
    padding: 0 20rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #eeeeee;
    background-color: #ff8722;
    border-radius: 44rpx;
    margin: 30rpx 175rpx;
    color: #fff;
}

.mt-246 {
    margin-top: 244rpx;
}

.h-10 {
    height: 10rpx;
}

.pd-20 {
    padding: 0 30rpx;
}

.van-field__label {
    color: #000 !important;
}

.van-field__placeholder {
    color: #969799 !important;
}

.van-field__control {
    color: #969799 !important;
}

.lh-70 {
    line-height: 70rpx;
}
</style>
